package com.xszx.beans;

/**
 * 用户实体类
 */
public class User {
    private Integer id;
    private String username;
    private String password;
    private Integer age;
    private String address;
    private String email;
    private String phone;
    private int rank;

    public int getRank() {
        return rank;
    }

    public void setRank(int rank) {
        this.rank = rank;
    }

    public void study() {
        System.out.println(this.username + (this.username.equals("路飞") ? "不" : "") + "爱学习");
    }

    static String time = "10:25";

    public void play() {
        String username = "jack";
        System.out.println(username);
        System.out.println(this.username);
    }

    public void game() {
        System.out.println(time);
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", age=" + age +
                ", address='" + address + '\'' +
                ", email='" + email + '\'' +
                ", phone='" + phone + '\'' +
                '}';
    }

    public User(Integer id, String username, Integer age, String address, String email, String phone) {
        this.id = id;
        this.username = username;
        this.age = age;
        this.address = address;
        this.email = email;
        this.phone = phone;
    }

    public User(Integer id, String username, Integer age, String address, String email, String phone, int rank) {
        this.id = id;
        this.username = username;
        this.age = age;
        this.address = address;
        this.email = email;
        this.phone = phone;
        this.rank = rank;
    }

    public User(String username, String password, int age, String address, String email, String phone) {
        this.username = username;
        this.password = password;
        this.age = age;
        this.address = address;
        this.email = email;
        this.phone = phone;
    }

    public User(int id, String username, String password, int age, String address, String email, String phone) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.age = age;
        this.address = address;
        this.email = email;
        this.phone = phone;
    }

    public User() {
    }


    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }
}
